package com.atmilan.quartz.sync.pull.daigo.mapper;

import java.util.Date;
import java.util.List;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

import com.atmilan.quartz.model.entity.daigo.DaigoProduct;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author hupeng
 * @since 2020-04-27
 */
public interface DaigoProductMapper extends BaseMapper<DaigoProduct> {
    int replaceIntoProduct(DaigoProduct daigoProduct);

    List<String> findDeleteGoodsIds(@Param("startTime") Date startTime);

    List<String> findAllGoodsIds();
    
    @Update("truncate table daigo_product")
    void deleteAll();
    
    @Update("truncate table daigo_product_back")
    void deleteProductBack();
    
    @Insert("insert into daigo_product_back select * from daigo_product")
    void copyProductBack();

}
